package com.weitu.environmental.basicInfo.service.impl;

import com.weitu.environmental.basicInfo.entity.Hwc;
import com.weitu.environmental.basicInfo.mapper.HwcMapper;
import com.weitu.environmental.basicInfo.service.HwcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @author zhangqingxi 2017-03-31
 */
@Service
public class HwcServiceImpl implements HwcService {

    private final HwcMapper hwcMapper;

    @Autowired
    public HwcServiceImpl(HwcMapper hwcMapper) {
        this.hwcMapper = hwcMapper;
    }

    @Override
    public List<Hwc> findByParam(Map paramMap) {
        return hwcMapper.findByParam(paramMap);
    }

    @Override
    public Integer findByParamCount(Map paramMap) {
        return hwcMapper.findByParamCount(paramMap);
    }

    @Override
    public Hwc findById(String id) {
        return hwcMapper.findById(id);
    }

    @Transactional
    @Override
    public Integer add(Map paramMap) {
        return hwcMapper.add(paramMap);
    }

    @Transactional
    @Override
    public Integer updateById(Map paramMap) {
        return hwcMapper.updateById(paramMap);
    }


}
